Integrand size = 33, antiderivative size = 202 \[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {(B-A n+B n) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\sin ^2(e+f x)\right ) (d \sin (e+f x))^{1+n}}{a d f (1+n) \sqrt {\cos ^2(e+f x)}}+\frac {(A-B) (1+n) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+n}}{a d^2 f (2+n) \sqrt {\cos ^2(e+f x)}}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{1+n}}{d f (a+a \sin (e+f x))} \]
(A-B)*cos(f*x+e)*(d*sin(f*x+e))^(1+n)/d/f/(a+a*sin(f*x+e))+(-A*n+B*n+B)*co s(f*x+e)*hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],sin(f*x+e)^2)*(d*sin(f*x+e ))^(1+n)/a/d/f/(1+n)/(cos(f*x+e)^2)^(1/2)+(A-B)*(1+n)*cos(f*x+e)*hypergeom ([1/2, 1+1/2*n],[1/2*n+2],sin(f*x+e)^2)*(d*sin(f*x+e))^(2+n)/a/d^2/f/(2+n) /(cos(f*x+e)^2)^(1/2)
Time = 0.50 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.79 \[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {(d \sin (e+f x))^n \left (\frac {(B-A n+B n) \sqrt {\cos ^2(e+f x)} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\sin ^2(e+f x)\right )}{1+n}+\frac {(A-B) (1+n) \sqrt {\cos ^2(e+f x)} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\sin ^2(e+f x)\right ) \sin (e+f x)}{2+n}+\frac {(A-B) \cos ^2(e+f x)}{1+\sin (e+f x)}\right ) \tan (e+f x)}{a f} \]
((d*Sin[e + f*x])^n*(((B - A*n + B*n)*Sqrt[Cos[e + f*x]^2]*Hypergeometric2 F1[1/2, (1 + n)/2, (3 + n)/2, Sin[e + f*x]^2])/(1 + n) + ((A - B)*(1 + n)* Sqrt[Cos[e + f*x]^2]*Hypergeometric2F1[1/2, (2 + n)/2, (4 + n)/2, Sin[e + f*x]^2]*Sin[e + f*x])/(2 + n) + ((A - B)*Cos[e + f*x]^2)/(1 + Sin[e + f*x] ))*Tan[e + f*x])/(a*f)
Time = 0.61 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3042, 3457, 3042, 3227, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (d \sin (e+f x))^n}{a \sin (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (d \sin (e+f x))^n}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\int (d \sin (e+f x))^n (a d (n B+B-A n)+a (A-B) d (n+1) \sin (e+f x))dx}{a^2 d}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{n+1}}{d f (a \sin (e+f x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (d \sin (e+f x))^n (a d (n B+B-A n)+a (A-B) d (n+1) \sin (e+f x))dx}{a^2 d}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{n+1}}{d f (a \sin (e+f x)+a)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {a d (-A n+B n+B) \int (d \sin (e+f x))^ndx+a (n+1) (A-B) \int (d \sin (e+f x))^{n+1}dx}{a^2 d}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{n+1}}{d f (a \sin (e+f x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a d (-A n+B n+B) \int (d \sin (e+f x))^ndx+a (n+1) (A-B) \int (d \sin (e+f x))^{n+1}dx}{a^2 d}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{n+1}}{d f (a \sin (e+f x)+a)}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {\frac {a (-A n+B n+B) \cos (e+f x) (d \sin (e+f x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+1}{2},\frac {n+3}{2},\sin ^2(e+f x)\right )}{f (n+1) \sqrt {\cos ^2(e+f x)}}+\frac {a (n+1) (A-B) \cos (e+f x) (d \sin (e+f x))^{n+2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+2}{2},\frac {n+4}{2},\sin ^2(e+f x)\right )}{d f (n+2) \sqrt {\cos ^2(e+f x)}}}{a^2 d}+\frac {(A-B) \cos (e+f x) (d \sin (e+f x))^{n+1}}{d f (a \sin (e+f x)+a)}\) |
((A - B)*Cos[e + f*x]*(d*Sin[e + f*x])^(1 + n))/(d*f*(a + a*Sin[e + f*x])) + ((a*(B - A*n + B*n)*Cos[e + f*x]*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Sin[e + f*x]^2]*(d*Sin[e + f*x])^(1 + n))/(f*(1 + n)*Sqrt[Cos[e + f *x]^2]) + (a*(A - B)*(1 + n)*Cos[e + f*x]*Hypergeometric2F1[1/2, (2 + n)/2 , (4 + n)/2, Sin[e + f*x]^2]*(d*Sin[e + f*x])^(2 + n))/(d*f*(2 + n)*Sqrt[C os[e + f*x]^2]))/(a^2*d)
3.1.4.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
\[\int \frac {\left (d \sin \left (f x +e \right )\right )^{n} \left (A +B \sin \left (f x +e \right )\right )}{a +a \sin \left (f x +e \right )}d x\]
\[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \left (d \sin \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\text {Timed out} \]
\[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \left (d \sin \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \left (d \sin \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(d \sin (e+f x))^n (A+B \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\int \frac {{\left (d\,\sin \left (e+f\,x\right )\right )}^n\,\left (A+B\,\sin \left (e+f\,x\right )\right )}{a+a\,\sin \left (e+f\,x\right )} \,d x \]